const RSE = require('../common/base-role');

class Message{
    constructor() {}
    
    message_vision(msg, me, you) {
        let your_gender, my_name, your_name;
        let str1, str2, str3;
    
        my_name = me.name;

        str1 = replace_string(msg,  "$P", gender_self(me.gender));
        str1 = replace_string(str1, "$N", gender_self(me.gender));
        str3 = replace_string(msg,  "$P", my_name);
        str3 = replace_string(str3, "$N", my_name);
    
        if (you) {
                your_name = you.name;
                your_gender = you.gender;
                str1 = replace_string(str1, "$p", RSE.gender_pronoun(your_gender));
                str1 = replace_string(str1, "$n", your_name);
    
            str3 = replace_string(str3, "$p", your_name);
            str3 = replace_string(str3, "$n", your_name);
    
            str2 = replace_string(msg,  "$P", RSE.gender_pronoun(me.gender));
            str2 = replace_string(str2, "$p", RSE.gender_self(your_gender));
            str2 = replace_string(str2, "$N", my_name);
            str2 = replace_string(str2, "$n", RSE.gender_self(your_gender));
            return ["vision", str2];
        }
    
        return ["vision", str1, str3];
    }
}

module.exports = Message